package Lesson2;

import java.util.Scanner;

public class exer {

	public static void main(String[] args) {

		Scanner sc = new Scanner (System.in);
			System.out.println( "Please add a year: ");
		int y = sc.nextInt();
			
			System.out.println("Please add a month: ");
		int m = sc.nextInt();
		
         if (y%4==0 && y%100==0 && y%400==0){
        	 
        	 switch (m){
        	 	case 1: System.out.println("31");break;
        	 	case 2: System.out.println("29");break;
        	 	case 3:	System.out.println("31");break;
        	 }
         }
		
	
	}
}
